#include "kstd.h"
#include "vga_driver.h"
#include "libvga.h"

int setvideo(int mode)
{
  switch (mode)
    {
    case 0x13 :
      libvga_switch_mode13h();
      break;
    case 0x3 :
      libvga_switch_mode3h();
      break;
    default:
      return -1;
      break;
    }

  return 0;
}

void swap_frontbuffer(const void* buffer)
{
  int i;
  char* actual_buffer = libvga_get_framebuffer();
  const char* buffer_ = buffer;

  for (i = 0; i < 320 * 200; i++)
    actual_buffer[i] = buffer_[i];
}
